<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="layout" content="bocMain"/>
    <title>进件作业系统</title>
</head>

<body>

<g:form method="post" action="approveStage" class="myform">
    <input type="hidden" name="id" id="id" value="${this?.opportunity?.id}">

    <div class="weui-msg" style="padding-top: 5rem">
        <div class="weui-msg__icon-area" style="display: flex;justify-content: center;align-items: center">
            <asset:image src="boc/hotline.png" class="img-circle" alt="logo" width="50" height="50"/>

            <div style="color: #ef4a6b;margin-left:15px;font-size: 2.5rem">
                ${com.next.OpportunityFlexField.findByNameAndCategory("百融授信结果", com.next.OpportunityFlexFieldCategory.findByOpportunityAndFlexFieldCategory(opportunity, com.next.FlexFieldCategory.findByName("百融授信结果")))?.value}</div>
        </div>

        <div class="weui-msg__text-area">
            <div style="display: flex;justify-content: center;align-items: center;">
                <h2 class="weui-msg__title" style="font-size: 1.5rem">授信额度</h2>

                <p class="weui-msg__desc"
                   style="color: #ef4a6b;font-size: 2rem;margin-left: 1.5rem;">¥${opportunity?.maximumAmountOfCredit}</p>
            </div>

            <p class="weui-msg__desc"
               style="color: #ef4a6b;font-size: 1.2rem;margin:0 auto 1.5rem;">总费率：${opportunity?.ompositeMonthlyInterest ? opportunity?.ompositeMonthlyInterest * 100 : 0}%/${opportunity?.loanDuration}期</p>

            <div style="font-size: 1.2rem;color: #999;margin-bottom: 30px;">
                <p>基础材料要求</p>

                <p class="hide" id="verifyMaterial">${opportunity?.verifyMaterial}</p>

                <div class="verifyMaterialList"></div>


            </div>

            <p class="weui-msg__desc">预授信通过 <br>
                最终结果以实际审批结果为准</p>
        </div>
    </div>

    <div class="bigBtn">
        <button type="submit" class="weui-btn weui-btn_primary" id="submit">下一步</button>
    </div>
</g:form>
<script>
    $(function () {
        var verifyMaterial = $("#verifyMaterial").text();
        var verifyMaterialStr = verifyMaterial.split(",")

        for (var i = 0; i < verifyMaterialStr.length; i++) {
            var content = '<p class="weui-msg__desc">' + verifyMaterialStr[i] + '</p>';
            $(".verifyMaterialList").append(content);
        }
    })
</script>
</body>
</html>
